//
//  DDDBannerListVC.m
//  DemoPod
//
//  Created by mu on 2020/9/22.
//  Copyright © 2020 Yujun Liang. All rights reserved.
//

#import "DDDBannerListVC.h"
#import "DDDExpressBannerVC.h"

@interface DDDBannerListVC ()<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *mainTableView;

@property (nonatomic, strong) NSMutableArray *dataAry;
@end

@implementation DDDBannerListVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"bannerList";
    self.dataAry = [NSMutableArray arrayWithArray:@[@"600_90",@"640_100",@"600_150",@"690_388",@"600_260",@"600_300",@"600_400",@"600_500",@"64X10All",@"64X10Image",@"64X10TextImage"]];
    [self.mainTableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"UITableViewCell"];
}


#pragma mark-- UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    DDDExpressBannerVC *vc = [[DDDExpressBannerVC alloc]init];
    vc.type = indexPath.row;
    [self.navigationController pushViewController:vc animated:YES];
    
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return  50.0;
}
#pragma mark-- UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.dataAry.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *indentifier = @"UITableViewCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:indentifier forIndexPath:indexPath];
    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:indentifier];
    }
    cell.textLabel.text = self.dataAry[indexPath.row];
    return cell;
}

@end
